package object;

/**
 * @TODO  9. 学生类：姓名，学号，出生日期，找出比“张三”大的所有同学信息
 * @Author xu
 * 2025/3/10
 */
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;


class Student {
    String name;
    String studentId;
    LocalDate birthDate;

    public Student(String name, String studentId, LocalDate birthDate) {
        this.name = name;
        this.studentId = studentId;
        this.birthDate = birthDate;
    }
}


public class LocalDate09 {
    public static void main(String[] args) {
        List<Student001> students = new ArrayList<>();
        students.add(new Student001("张三", "001", LocalDate.of(2000, 1, 1)));
        students.add(new Student001("李四", "002", LocalDate.of(1999, 1, 1)));
        students.add(new Student001("王五", "003", LocalDate.of(2001, 1, 1)));
        // 添加更多学生...

        LocalDate zhangSanBirthDate = LocalDate.of(2000, 1, 1); // 张三的出生日期

        System.out.println("比张三大的同学信息:");
        for (Student001 student : students) {
            if (student.birthDate.isBefore(zhangSanBirthDate)) {
                System.out.println("姓名: " + student.name + ", 学号: " + student.studentId + ", 出生日期: " + student.birthDate);
            }
        }
    }
}